package com.aos.erp.schools.model.branchschool.ro;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 报名点实体
 * </p>
 *
 * @author ywb
 * @since 2018-11-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_drivers_school")
public class UpdateBranchSchoolRo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long    id;
    /**
     * 父级驾校ID
     */
    @NotNull(message = "上级驾校不能为空")
    @TableField("parent_id")
    private Long parentId;

    /**
     * 报名点名称
     */
    @NotNull(message = "报名点名称不能为空")
    private String name;

    /**
     * 详细地址
     */
    @NotNull(message = "详细地址不能为空")
    private String address;
    /**
     * 经度
     */
    @NotNull(message = "经度不能为空")
    private String longitude;
    /**
     * 纬度
     */
    @NotNull(message = "纬度不能为空")
    private String latitude;
    /**
     * 联系人
     */
    @NotNull(message = "联系人不能为空")
    private String contacts;
    /**
     * 手机号
     */
    @NotNull(message = "手机号不能为空")
    //@Pattern(regexp="^(((13[0-9])|(14[579])|(15([0-3]|[5-9]))|(16[6])|(17[0135678])|(18[0-9])|(19[89]))\\\\d{8})$",message = "手机号码错误")
    private String  mobile;

  /*  *//**
     * 创建人
     * 暂时先写死创建人ID
     *//*
    private Long  currentUserId;*/

    @Override
    public String toString() {
        return "UpdateBranchrSchoolRo{" +
                "id=" + id +
                ", parentId=" + parentId +
                ", name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", longitude='" + longitude + '\'' +
                ", latitude='" + latitude + '\'' +
                ", contacts='" + contacts + '\'' +
                ", mobile='" + mobile + '\'' +
                '}';
    }
}
